<?php

class IndexController extends Zend_Controller_Action
{

    public function init()
    {
        /* Initialize action controller here */
    }

    public function indexAction()
    {
//        $groups = $this->view->authMember->findManyToManyRowset(
//            'Model_DbTable_Group',
//            'Model_DbTable_MemberGroup'
//        );
//        $logo = 'death_400x400.jpg';
//        $fileInfo = pathinfo($logo);
//        $filePath = Zend_Registry::get('config')->settings->paths->uploads . DIRECTORY_SEPARATOR . $logo;
//        $file = fopen($filePath, 'r'); 
//        $url = Zend_Registry::get('config')->settings->cdn->protocol
//            . Zend_Registry::get('config')->settings->cdn->username . ':'
//            . Zend_Registry::get('config')->settings->cdn->password . '@'
//            . Zend_Registry::get('config')->settings->cdn->hostname . ':'
//            . Zend_Registry::get('config')->settings->cdn->port 
//            . '/images/' . time() . '.' . $fileInfo['extension'];
//        $ch = curl_init();
//        curl_setopt($ch, CURLOPT_URL, $url);
//        curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
//        curl_setopt($ch, CURLOPT_UPLOAD, 1);
//        curl_setopt($ch, CURLOPT_INFILE, $file);
//        curl_setopt($ch, CURLOPT_INFILESIZE, filesize($filePath));
//        $result = curl_exec($ch);
//        curl_close($ch);
    }
}